package com.nanjia.boot.myflow.order.item.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nanjia.boot.myflow.order.item.model.entity.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nanjia.boot.myflow.order.item.model.query.OrderItemQuery;
import com.nanjia.boot.myflow.order.item.model.vo.OrderItemVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 订单商品明细Mapper接口
 *
 * @author 周洋
 * @since 2025-07-18 14:59
 */
@Mapper
public interface OrderItemMapper extends BaseMapper<OrderItem> {

    /**
     * 获取订单商品明细分页数据
     *
     * @param page 分页对象
     * @param queryParams 查询参数
     * @return {@link Page<OrderItemVO>} 订单商品明细分页列表
     */
    Page<OrderItemVO> getOrderItemPage(Page<OrderItemVO> page, OrderItemQuery queryParams);

    List<OrderItemVO> getOrderItemList(@Param("queryParams") OrderItemQuery queryParams);

    Integer insertBatch(@Param("list") List<OrderItem> list);

    List<OrderItemVO> getOrderItemListByids(@Param("queryParams") List<Long> orderIds);
}
